package models
{
	import flash.utils.Dictionary;

	public class CoLUM
	{
		public function CoLUM(country:String, year:int, land_type:String, category:String, item:String, amount:Number)
		{
			this.year = year;
			
			if (land_type == "CL") this.land_type = "Cropland";
			else if (land_type == "GL") this.land_type = "Grazing Land";
			else if (land_type == "FL") this.land_type = "Forest Land";
			else if (land_type == "FG") this.land_type = "Fishing Grounds";
			else if (land_type == "BL") this.land_type = "Built-up land";
			else if (land_type == "C") this.land_type = "Carbon";
			else if (land_type == "T") this.land_type = "Total";
			
			if (category == "HH") this.category = "Household";
			else if (category == "GOV") this.category = "Government";
			else if (category == "GFCF") this.category = "Gross Fixed Capital Formation";
			else if (category == "TOTAL") this.category = "Total";
			
			this.item = item;
			
			this.itemListing = new Dictionary();
			
			var  one:Array = ["Food and non-alcoholic beverages", "Food", "Non-alcoholic beverages"];
			var  two:Array = ["Alcoholic beverages, tobacco and narcotics", "Alcoholic beverages", "Tobacco"];
			var  three:Array = ["Clothing and footwear", "Clothing", "Footwear"];
			var  four:Array = ["Housing, water, electricity, gas and other fuels", "Actual renting for housing", "Imputed rentals for housing", "Maintenance and repair of the dwelling", "Water supply and miscellaneous dwelling services", "Electricity, gas other fuels"];
			var  five:Array = ["Household furnishings, equipment and maintenance", "Furniture, furnishings, carpets etc.", "Household textiles", "Household appliances", "Glassware, tableware & household utensils", "Tools and equipment for house & garden", "Goods & services for household maintenance"];
			var  six:Array = ["Health", "Medical products, appliances & equipment", "Out-patient services", "Hospital services"];
			var  seven:Array = ["Transportation", "Purchase of vehicles", "Operation of personal transport equipment", "Transport services"];
			var  eight:Array = ["Communication", "Postal services", "Operation of personal transport equipment", "Transport services"];
			var  nine:Array = ["Recreation and culture", "Audio-visual, photo & info. Processing equipment", "Other major durables for recreation & culture", "Other recreation equipment etc.", "Recreational & cultural services", "Newspapers, books & stationery", "Package holidays"];
			var  ten:Array = ["Education", "Education"];
			var  eleven:Array = ["Restaurants and hotels", "Catering services", "Accommodation services"];
			var  twelve:Array = ["Miscellaneous goods and services", "Personal care", "Personal effects nec", "Social protection", "Insurance", "Financial services nec", "Other services nec"];
			
			this.itemListing["1"] = one;
			this.itemListing["2"] = two;
			this.itemListing["3"] = three;
			this.itemListing["4"] = four;
			this.itemListing["5"] = five;
			this.itemListing["6"] = six;
			this.itemListing["7"] = seven;
			this.itemListing["8"] = eight;
			this.itemListing["9"] = nine;
			this.itemListing["10"] = ten;
			this.itemListing["11"] = eleven;
			this.itemListing["12"] = twelve;
			
			this.amount = amount;
			
			this.country = country;
		}
		
		public function toString():String
		{
			return "Year: " + year + "; Land Type: " + land_type + "; Category: " + category + "; Item: " + item + "; Amount: " + amount;
		}
		
		public var country:String;
		public var year:int;
		public var land_type:String;
		public var category:String;
		public var item:String;
		public var itemListing:Dictionary;
		public var amount:Number;
	}
}